 <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>{$Think.config.site.title} - 支款申请</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">

    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.min.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.min.css?v=4.0.0" rel="stylesheet">

</head>
<style>
#listtable .fa{
    cursor:pointer;
    color:#1ab394;
    margin-right:1em;
}
th .tag{font-size: 12px; color: #e66c6c; font-weight: normal;}
.ibox-title .tag{font-size: 12px; color: #e66c6c; font-weight: normal; display: inline-block; margin-left: 20px;}
.specval-hide{display: none;}
th,td{text-align: center;}
.select_sort{cursor: pointer;}
.text-r{text-align: right !important;}
.text-l{text-align: left !important;}

.shou{display: inline-block; background: #1ab394; width: 17px; height: 17px; border-radius: 50%; text-align: center; color: #fff}
.zhi{display: inline-block; background: #ff6969; width: 17px; height: 17px; border-radius: 50%; text-align: center; color: #fff}
.vtop{vertical-align: top !important;}

.goodslist tr{border-left: 1px solid #e4dcdc; border-top: 1px solid #e4dcdc;}
.goodslist td{border-right: 1px solid #e4dcdc; border-bottom: 1px solid #e4dcdc;}
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">

      <div class="row">
          <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>支款申请列表</h5>
                        <!-- <span class="tag">说明：</span> -->
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-6">
                            </div>
                            <div class="col-sm-6">
                                <div class="input-group pull-right">
                                    <form id="froms" name="myform" action="{:url('index')}" method="get" enctype="application/x-www-form-urlencoded">
                                        <div class="input-group">
                                            <input type="text" placeholder="配送员姓名" class="input-sm form-control" value="{$Think.get.keywords ?? ''}" name="keywords">
                                            <input type="hidden" class="sort" name="sort" value="">
                                            <input type="hidden" class="sort_status" name="sort_status" value="">
                                            <span class="input-group-btn">
                                                <button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            
                        </div>
                        <div class="table-responsive">
                            <table class="table table-striped" id="listtable">
                                <thead>
                                    <tr>
                                        <th width="150">时间<p style="margin-bottom: 0">&nbsp;</p></th>
                                        <th width="100">采购员<p style="margin-bottom: 0">&nbsp;</p></th>
                                        <th  class="text-l">采购明细
                                            <table>
                                            <tr>
                                                <td class="text-l" style="width: 200px; font-size: 12px; font-weight:normal;">商品</td>
                                                <td style="width: 60px; text-align: right; font-size: 12px; font-weight:normal;">应采数量</td>
                                                <td style="width: 80px; text-align: right; font-size: 12px; font-weight:normal;">商品单价</td>
                                                <td style="width: 60px; text-align: right; font-size: 12px; font-weight:normal;">实采数量</td>
                                                <td style="width: 80px; text-align: right; font-size: 12px; font-weight:normal;">实采单价</td>
                                                <td style="width: 80px; text-align: right; font-size: 12px; font-weight:normal;">支付状态</td>
                                                <td style="width: 80px; text-align: right; font-size: 12px; font-weight:normal;">供应商</td>
                                                <td style="width: 80px; text-align: right; font-size: 12px; font-weight:normal;">供应商金额</td>
                                            </tr>
                                            </table>
                                        </th>
                                        <th width="100" class="text-r">预计金额<p style="margin-bottom: 0">&nbsp;</p></th>
                                        <th width="100" class="text-r">实际金额<p style="margin-bottom: 0">&nbsp;</p></th>
                                        <th  class="text-l">支款明细<p style="margin-bottom: 0">&nbsp;</p></th>
                                        <!-- <th >操作<p style="margin-bottom: 0">&nbsp;</p></th> -->
                                    </tr>
                                </thead>
                                <tbody>
                                    {volist name="list" id="kv"}
                                    {volist name="kv['list']" id="vo"}
                                    <tr data-id="{$vo.purchase_id}">
                                        <td class="time vtop">{$vo.create_time}</td>
                                        <td class="employee vtop">{$vo.employee_name}</td>
                                        <td class="text-l">
                                            <table  class="goodslist">
                                            {volist name="vo['_list']" id="_v"}
                                            {volist name="_v['list']" id="v"}
                                            <tr {if($v['num']!=$v['real_num'])} style="background: #ce7c7c" {/if}>
                                                <td class="text-l" style="width: 200px">（{$v['brand_name']}）{$v['goods_name']} {$v['specval_name']}</td>
                                                <td style="width: 60px; text-align: right;">x{$v['num']}</td>
                                                <td style="width: 80px; text-align: right;">￥{$v['price']}</td>
                                                <td style="width: 60px; text-align: right;">x{$v['real_num']}</td>
                                                <td style="width: 80px; text-align: right;">￥{:number_format($v['cur_price'],2)}</td>
                                                <td style="width: 80px; text-align: right;">{if($v['pay_status'])}已支付{else}未支付{/if}</td>
                                                {if($i==1)}
                                                <td style="width: 80px; text-align: right;" rowspan="{:sizeof($_v['list'])}" >{if($v['supplier_name'])}{$v['supplier_name']}{else}无{/if}</td>
                                                <td style="width: 80px; text-align: right;" rowspan="{:sizeof($_v['list'])}" >￥{$_v['total']}</td>
                                                {/if}
                                            </tr>
                                            {/volist}
                                            {/volist}
                                            </table>
                                        </td>
                                        <td class="text-r money vtop">￥{:number_format($vo.total,2)}</td>
                                        <td class="text-r realmoney vtop">￥{:number_format($vo.realtotal,2)}</td>

                                        <td class="text-l vtop">
                                            <table>
                                            {volist name="vo['appropriation']" id="va" empty="-"}
                                            <tr>
                                                <td style="width: 20px; text-align: left;">{if($va['type'])}<span class="shou">收</span>{else}<span class="zhi">支</span>{/if}</td>
                                                <td style="width: 130px; text-align: right;">{$va['create_time']}</td>
                                                <td style="width: 80px; text-align: right;">￥{$va['money']}</td>
                                            </tr>
                                            {/volist}
                                            </table>
                                        </td>
                                        <!-- <td class="vtop">
                                            <button class="btn btn-primary agree">支款</button>
                                            <button class="btn btn-primary refund" data-ent="{$vo.ent}" data-out="{$vo.out}">退款</button>
                                            <button class="btn btn-primary finish">完成</button>
                                        </td> -->
                                    </tr>
                                    {/volist}
                                    <tr style="background: #f5abab">
                                        <td class="text-r" colspan="3">{$kv.time}日统计：</td>
                                        <td class="text-r">￥{:number_format($kv.total,2)}</td>
                                        <td class="text-r">￥{:number_format($kv.realtotal,2)}</td>
                                        <td ></td>
                                    </tr>
                                    {/volist}
                                </tbody>
                            </table>
                        </div>
                        <div>{$page}</div>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/peity/jquery.peity.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/iCheck/icheck.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/majax.js"></script>
</body>

</html>
<script>

</script>